package com.example.lenovo.test1;

import androidx.appcompat.app.AppCompatActivity;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

public class Main5Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main5);
    }
    public void  onMybtnClick(View view2){
        ProgressDialog  mProgressDialog = new ProgressDialog(this);
        mProgressDialog.setCanceledOnTouchOutside(false);
        mProgressDialog.show();
        View view = LayoutInflater.from(this).inflate(R.layout.my_progress,null);
        ImageView animImage = (ImageView)view.findViewById(R.id.animImage);
        Animation animationProgress = AnimationUtils.loadAnimation(this, R.anim.progress);
        animImage.startAnimation(animationProgress);
        TextView mProgressDialogTvTip = (TextView)view.findViewById(R.id.tvTip);

        mProgressDialog.setContentView(view);

    }
}
